<include file="Public:js" /> 
<!-- 配置文件 -->
<script type="text/javascript" src="__PUBLIC__/ueditor/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="__PUBLIC__/ueditor/ueditor.all.js"></script>
 
<div class="main-wrap">

        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i><a href="">首页</a><span class="crumb-step">&gt;</span><span class="crumb-name">添加商品</span></div>
        </div>
        
        <div class="result-wrap">
            <form action="{:U('Fangwei/addFujiaInfoSub')}" method="post" id="myform" name="myform" enctype="multipart/form-data">
             
                <div class="config-items">
                    <div class="config-title">
                        <h1><i class="icon-font">&#xe00a;</i>添加追溯信息</h1>
                    </div>
                    <div class="result-content">
                        <table width="100%" class="insert-tab">
                        	<!-- 商品分类id -->
                        	<input type="hidden" value="{$cat_id}" name="cat_id">
                        	<!-- 商品id -->
                        	<input type="hidden" value="{$goods_id}" name="goods_id">
                            <tbody>
                            <volist name="terms" id="vo" empty="该商品分类下暂无信息模块" >
	                            <tr>    
									<th width="15%"><i class="require-red">*</i>{$vo.name}</th>           
	                               
	                                   <if condition="$vo.form_type eq 'text'">
	                                   <td>
										 <input type="text"  style='width: 70%' datatype="*" placeholder="请输入{$vo.name}" nullmsg="请填写标题" errormsg="请填写标题"  name="{$vo.field}" class="common-text"> 
										</td>
									   <elseif condition="$vo.form_type eq 'textarea'"/> 
									   	<td>
									   	 <textarea name="{$vo.field}" style='width: 70%;height: 160px;' ></textarea>	
									   	</td>
									   	<elseif condition="$vo.form_type eq 'radio'"/> 
									   	<td>
									   		<foreach name="vo.value" item="val" key="k" > 
									   		    <input type="radio" name="{$vo.field}" value="{$val}" id="">{$val}
									   		</foreach>
									   		
									   	</td>
									   	<elseif condition="$vo.form_type eq 'checkbox'"/> 
									   		<td>
									   			<foreach name="vo.value" item="val" key="k" > 
										   		    <input type="checkbox" name="{$vo.field}[]" value="{$val}" id="">{$val}
										   		</foreach>
									   		</td>
									   	<elseif condition="$vo.form_type eq 'datetime'"/> 
									   		<td>
									   			<input placeholder="请输入日期" name='{$vo.field}'  class="laydate-icon" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"> 
									   		</td>
									   	<elseif condition="$vo.form_type eq 'editor'"/>
									   	<td>
									   		 <!-- 实例化编辑器 -->
												<script type="text/javascript">
												    var ue = UE.getEditor("{$vo.field}");
												</script>
												 <!-- 加载编辑器的容器 -->
											    <script id="{$vo.field}" style="width:80%" name="{$vo.field}"  type="text/plain">
											         
											    </script>
									   	</td>
									   	<elseif condition="$vo.form_type eq 'pic'"/>
									   	<td>
									   		<input type="file" name="{$vo.field}" id="">
									   	</td>
									 <!--   	<td>
									   		<input type="file" name="{$vo.field}2323" id="">
									   	</td> -->
									   </if>
		                                	     
	                            </tr>
                            </volist>
                               
                            <tr>
                                <th></th>
                                <td>
                                  
                                    <input type="submit" value="提交" class="btn btn-primary btn6 mr10">
                                    <input type="button" value="返回" onclick="history.go(-1)" class="btn btn6">
                                </td>
                            </tr>

                            </tbody></table>
                    </div>
                </div>
                </form>
                
        </div>
    </div>

<script type="text/javascript">
$(function(){
	
	 $("#myform").Validform({
	    
	 });  //就这一行代码！;
		
	  
	
})
</script>


